package com.zyh.number;

public class NumberDemo1 {
    public static void main(String[] args) {
        //1.直接赋值
        int num = 10;
        byte i = 11;
        Integer num1 = num;
        System.out.println("num1 = " + num1);
        //2.构造方法
        Integer num2 = new Integer("-77");
        System.out.println("num2 = " + num2);
        //3.public static Integer valueOf(int i),类名调用静态方法
        Integer num3 = Integer.valueOf(num);
        System.out.println("num3 = " + num3);

        Byte num4 = new Byte(i);
        System.out.println("num4 = " + num4);
        Byte num5 = Byte.valueOf(i);
        System.out.println("num5 = " + num5);
        Integer integer = new Integer(2);
        System.out.println("integer = " + integer);
    }
}
